package test.demo;
/***
 ** @category 接口隔离-示例二
 ** @author qing.yunhui
 ** @email: qingyh@glodon.com
 ** @createTime: 2021-12-30 14:03
 **/
public class InterfaceIsolationNew { }
interface IEatAnimal{
    /**
     * <p>吃货</p>
     * */
    void eat();
}
interface IFlyAnimal{
    /**
     * <p>飞上天</p>
     * */
    void fly();
}
interface IWalkAnimal{
    /**
     * <p>行走</p>
     * */
    void walk();
}
interface ISwimAnimal{
    /**
     * <p>水里游</p>
     * */
    void swim();
}
class DogNew implements IEatAnimal,IWalkAnimal{
    @Override
    public void eat() { System.out.println("小狗在吃汉堡"); }
    @Override
    public void walk() { System.out.println("小狗在地上走"); }
}
class BirdNew  implements IFlyAnimal,IEatAnimal{
    @Override
    public void eat() { }
    @Override
    public void fly() { }
}
